package modelo.servicio;

import modelo.dominio.Solicitable;

public class CargarSolicitado {

    private CargarSolicitado() {
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        throw new CloneNotSupportedException("Imposible clonar carga de solicitado");
    }
    
    public static Solicitable generar(int numeroObj, String llavePrimaria[]) {
        Solicitable obj = null;
        switch (numeroObj) {
            case 1:
                long idFact = llavePrimaria[2] != null ? Long.parseLong(llavePrimaria[2]) : 0;
                obj = Facturas.instancia().porClave(llavePrimaria[0], 
                        idFact, llavePrimaria[3]);
                break;
            case 2:
                break;
        }
        return obj;
    }
}
